//
// Created by ASUS on 2022/7/28.
//

#ifndef LIVEP_FACTORY_H
#define LIVEP_FACTORY_H

#include "User.h"
#include "Admin.h"
#include "IUser.h"
#include <cstring>


IUser *Factory(const char *userType, char *username, char *password) {
    if (strcmp(userType, "user") != 0) {
        return new Admin(username, password);
    }
    return new User(username, password);
}


#endif //LIVEP_FACTORY_H
